<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Employer extends CI_Controller {

	public function __construct(){
		parent::__construct();
		$this->load->model('model_job');
		$this->load->model('model_user');
		$this->load->model('model_record');
	}

	public function index(){
		$data['employer'] = $this->model_user->list_employer();
		$data['title'] = "Danh sách doanh nghiệp";
		$data['subview'] = "admin/list_employer";
		$this->load->view('main', $data);
	}

	public function list_job($id_dn){
		$data['list_job'] = $this->model_job->list_job($id_dn);
		$data['employer_name'] = $this->model_user->get_employer_name($id_dn)['ten_cty'];
		$data['title'] = "Danh sách công việc thực tập";
		$data['subview'] = "admin/list_job_employer";
		$this->load->view('main', $data);
	}

	public function list_candidate($id_cv){
		$data['job'] = $this->model_job->job_detail($id_cv);
		$data['info'] = $this->model_job->list_apply_admin($id_cv);
		$data['title'] = "Danh sách các ứng viên";
		$data['subview'] = "admin/list_candidate";
		$this->load->view('main', $data);
}
}